﻿namespace Microsoft.SharePoint.Client
{
    using System;
    using System.Collections.Generic;

    public sealed class ClientObjectData
    {
        private ClientObject m_associatedObject;
        private Dictionary<string, object> m_clientObjectProperties;
        private Dictionary<string, object> m_methodReturnObjects;
        private ObjectPath m_path;
        private Dictionary<string, object> m_properties;
        private ClientQueryInternal m_query;
        private string m_version;

        internal ClientObject AssociatedObject
        {
            get
            {
                return this.m_associatedObject;
            }
            set
            {
                this.m_associatedObject = value;
            }
        }

        public Dictionary<string, object> ClientObjectProperties
        {
            get
            {
                if (this.m_clientObjectProperties == null)
                {
                    this.m_clientObjectProperties = new Dictionary<string, object>();
                }
                return this.m_clientObjectProperties;
            }
        }

        public Dictionary<string, object> MethodReturnObjects
        {
            get
            {
                if (this.m_methodReturnObjects == null)
                {
                    this.m_methodReturnObjects = new Dictionary<string, object>();
                }
                return this.m_methodReturnObjects;
            }
        }

        internal ObjectPath Path
        {
            get
            {
                return this.m_path;
            }
            set
            {
                this.m_path = value;
            }
        }

        public Dictionary<string, object> Properties
        {
            get
            {
                if (this.m_properties == null)
                {
                    this.m_properties = new Dictionary<string, object>();
                }
                return this.m_properties;
            }
        }

        internal ClientQueryInternal Query
        {
            get
            {
                return this.m_query;
            }
            set
            {
                this.m_query = value;
            }
        }

        internal string Version
        {
            get
            {
                return this.m_version;
            }
            set
            {
                this.m_version = value;
            }
        }
    }
}

